<?php
/**
 * App for managing contacts
 * 
 * Template for contact detail
 * 
 * @category Abovo
 * 
 * @package Abovo_App_Crm
 * 
 * @subpackage Abovo_App_Crm_Contacts
 * 
 * @license http://opensource.org/licenses/gpl-license.php GPL
 * 
 * @author Antti Holvikari <anttih@gmail.com>
 */
?>
<?php
$this->layout_sub['crm/contacts/edit/' . $this->contact->id] = $this->getText('APP_ACTION_EDIT');
$this->page_title = $this->contact->firstname . ' ' . $this->contact->lastname;
?>
<form name="delete_contact" method="post" action="<?php echo $this->action('crm/contacts/edit/' . $this->contact->id) ?>">
    <?php echo $this->formSubmit(array(
        'name'  => 'process',
        'value' => $this->getText('PROCESS_DELETE'),
    )) ?>
</form>
<table class="list">
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_LASTNAME') ?></th>
        <td><b><?php echo $this->escape($this->contact->lastname) ?></b></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_FIRSTNAME') ?></th>
        <td><b><?php echo $this->escape($this->contact->firstname) ?></b></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Company', 'LABEL_NAME') ?></th>
        <td><a href="<?php echo $this->action('crm/companies/show/' . $this->contact->companies_id) ?>">
            <?php echo $this->escape($this->contact->company) ?></a>
        </td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_EMAIL') ?></th>
        <td><a href="mailto: <?php echo $this->escape($this->contact->email) ?>"><?php echo $this->escape($this->contact->email) ?></a></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_TEL') ?></th>
        <td><?php echo $this->escape($this->contact->tel) ?></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_ADR') ?></th>
        <td><?php echo $this->escape($this->contact->adr) ?></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_POSTAL_CODE') ?></th>
        <td><?php echo $this->escape($this->contact->postal_code) ?></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_CITY') ?></th>
        <td><?php echo $this->escape($this->contact->city) ?></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_COUNTRY') ?></th>
        <td><?php echo Solar::$locale->fetch('Lux_Intl', 'COUNTRY_' . $this->contact->country) ?></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Contacts', 'LABEL_GENDER') ?></th>
        <td><?php echo $this->escape($this->contact->gender) ?></td>
    </tr>
    <tr>
        <th><?php echo $this->getText('LABEL_CREATED') ?></th>
        <td><?php echo $this->timestamp($this->contact->created, $this->getText('FORMAT_TIMESTAMP')) ?></td>
    </tr>
    <tr>
        <th><?php echo Solar::$locale->fetch('Abovo_Model_Company', 'LABEL_UPDATED') ?></th>
        <td><?php echo $this->timestamp($this->contact->updated, $this->getText('FORMAT_TIMESTAMP')) ?></td>
    </tr>
</table>